function ajaxPostFunc(url, data, headers = {}, callback) {
    $('body').append('<div class="ycxq-loading-mask">加载中...</div>');

    $.ajax({
        url: url,
        type: 'post',
        headers: headers,
        data: JSON.stringify(data),
        contentType: 'application/json; charset=utf-8',
        processData: false,
        cache: false,
        dataType: 'json',
        success: function (data) {
            if(data.code == 200) {
                return callback(data.data)
            } else {
                alert(data.message || data.msg);
                // $.alert(data.message || data.msg);
            }
        },
        error: function (data) {
            console.log(data)
            alert('请求失败');
        },
        complete: function (data) {
            $('.ycxq-loading-mask').remove();
        }
    })
}

